package com.xhd.base.session;

public class SessionId {
	private String jm111 = null;
	private String jm84 = null;
	private String jm392 = null;
	private String jm393 = null;

	public SessionId() {
	}

	public SessionId(String paramString) {
		if ((paramString == null) || (paramString.length() <= 0))
			return;
		this.jm111 = paramString;
		int i = 0;
		for (int j = 0; j < 3; ++j) {
			int k = this.jm111.indexOf(46, i);
			if (k > 0) {
				String str = this.jm111.substring(i, k);
				i = k + 1;
				if (j == 0)
					this.jm392 = str;
				else if (j == 1)
					this.jm84 = str;
				else
					this.jm393 = str;
			} else {
				this.jm393 = this.jm111.substring(i);
				return;
			}
		}
	}

	public String getId() {
		return this.jm111;
	}

	public String getServerId() {
		return this.jm84;
	}

	public String getCompId() {
		return this.jm392;
	}

	public String getGuid() {
		return this.jm393;
	}

	public String generateId(String paramString1, String paramString2,
			String paramString3) {
		this.jm111 = paramString2 + "." + paramString1 + "." + paramString3;
		return this.jm111;
	}

	public String getLicence() {
		String str = this.jm393;
		if ((str != null) && (str.length() > 38))
			return str.substring(0, 38);
		return null;
	}

	public static void main(String[] paramArrayOfString) {
		SessionId localCPCSessionId = new SessionId(
				"b.cctest.{788855BA-0A2E-4099-95DA-6E39F38C5D1E}");
		System.out.println(localCPCSessionId.getId());
		System.out.println(localCPCSessionId.getServerId());
		System.out.println(localCPCSessionId.getCompId());
		System.out.println(localCPCSessionId.getGuid());
	}
}
